Telegram Group & Telegram Channel
تبدیل متن به صوت توسط زبان برنامه‌نویسی پایتون 💻.


اول نیازه پکیج gtts (مخفف google text to speech) رو وارد کنیم 🤔:
from gtts import gTTS
‌ ‌‌

بعدش کافیه متن خودمون رو بنویسیم (متاسفانه در حال حاضر از زبان فارسی 🇮🇷 پشتیبانی نمی‌کنه). در زیر من یه نقل‌قول قشنگ 😍 از جیم ران رو نوشتم. با سه تا " هم نوشتم، چون میخواستم متن چند خطی بنویسم 👌.

x = """
Success is not something you pursue.
Success is something you develop.
"""

‌ ‌ ‌
در ادامه از همون gTTS استفاده می‌کنیم.
- به آرگومان text، متن خودمون که متغیر x باشه رو میدیم 📒.
- و اون tld رو هم بهش میدم us (می‌دونیم US یعنی United States یا همون ایالات متحده یا همون آمریکا 🇺🇸). چون اگر بهش ندیم، میره با لهجه بریتیش 🇬🇧 تلفظ می‌کنه که به شخصه از بریتیش خوشم نمیاد. و لهجه امریکن رو دوست دارم.
audio = gTTS(text=x, tld="us")
خروجی این بزرگوار رو میریزیم توی متغیری به اسم audio 🔉.


‌ در نهایت هم فایل صوتی رو در یک مسیری که دوست داریم، سیو می‌کنیم .
audio.save(r"H:\temp\02.mp3")
‌ ‌

قبل از اجرا دو تا نکته یادتون نره:
۱. باید پکیج gTTS رو نصب کرده باشید. با:
pip install gTTS


۲. اینترنت رو حتما وصل کنید 🌐. چون تبدیل متن به صوت رو آنلاین انجام میده.



tg-me.com/python_easy_learn/2008
Create:
Last Update:

تبدیل متن به صوت توسط زبان برنامه‌نویسی پایتون 💻.


اول نیازه پکیج gtts (مخفف google text to speech) رو وارد کنیم 🤔:
from gtts import gTTS
‌ ‌‌

بعدش کافیه متن خودمون رو بنویسیم (متاسفانه در حال حاضر از زبان فارسی 🇮🇷 پشتیبانی نمی‌کنه). در زیر من یه نقل‌قول قشنگ 😍 از جیم ران رو نوشتم. با سه تا " هم نوشتم، چون میخواستم متن چند خطی بنویسم 👌.

x = """
Success is not something you pursue.
Success is something you develop.
"""

‌ ‌ ‌
در ادامه از همون gTTS استفاده می‌کنیم.
- به آرگومان text، متن خودمون که متغیر x باشه رو میدیم 📒.
- و اون tld رو هم بهش میدم us (می‌دونیم US یعنی United States یا همون ایالات متحده یا همون آمریکا 🇺🇸). چون اگر بهش ندیم، میره با لهجه بریتیش 🇬🇧 تلفظ می‌کنه که به شخصه از بریتیش خوشم نمیاد. و لهجه امریکن رو دوست دارم.
audio = gTTS(text=x, tld="us")
خروجی این بزرگوار رو میریزیم توی متغیری به اسم audio 🔉.


‌ در نهایت هم فایل صوتی رو در یک مسیری که دوست داریم، سیو می‌کنیم .
audio.save(r"H:\temp\02.mp3")
‌ ‌

قبل از اجرا دو تا نکته یادتون نره:
۱. باید پکیج gTTS رو نصب کرده باشید. با:
pip install gTTS


۲. اینترنت رو حتما وصل کنید 🌐. چون تبدیل متن به صوت رو آنلاین انجام میده.

BY آکادمی پایتون


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/python_easy_learn/2008

View MORE
Open in Telegram


آکادمی پایتون Telegram | DID YOU KNOW?

Date: |

Can I mute a Telegram group?

In recent times, Telegram has gained a lot of popularity because of the controversy over WhatsApp’s new privacy policy. In January 2021, Telegram was the most downloaded app worldwide and crossed 500 million monthly active users. And with so many active users on the app, people might get messages in bulk from a group or a channel that can be a little irritating. So to get rid of the same, you can mute groups, chats, and channels on Telegram just like WhatsApp. You can mute notifications for one hour, eight hours, or two days, or you can disable notifications forever.

Telegram and Signal Havens for Right-Wing Extremists

Since the violent storming of Capitol Hill and subsequent ban of former U.S. President Donald Trump from Facebook and Twitter, the removal of Parler from Amazon’s servers, and the de-platforming of incendiary right-wing content, messaging services Telegram and Signal have seen a deluge of new users. In January alone, Telegram reported 90 million new accounts. Its founder, Pavel Durov, described this as “the largest digital migration in human history.” Signal reportedly doubled its user base to 40 million people and became the most downloaded app in 70 countries. The two services rely on encryption to protect the privacy of user communication, which has made them popular with protesters seeking to conceal their identities against repressive governments in places like Belarus, Hong Kong, and Iran. But the same encryption technology has also made them a favored communication tool for criminals and terrorist groups, including al Qaeda and the Islamic State.

آکادمی پایتون from ua


Telegram آکادمی پایتون
FROM USA